#ifndef COMMON_DEFS_H_
#define COMMON_DEFS_H_


// debug prints - DBG_PRINT for flow prints, ERR_PRINT should be used when an error occurred
#ifdef NDEBUG

	#define DBG_PRINT(format, args ...)  ((void) 0 ) // do nothing
	#define ERR_PRINT(format, args ...)  ((void) 0 ) // do nothing
		
#else

	#include <cstdio>
	#define DBG_PRINT(args ...) printf("%s, %d: ",__func__, __LINE__);  		printf(args)
	#define ERR_PRINT(args ...) fprintf(stderr,"%s, %d: ",__func__, __LINE__); 	fprintf(stderr,args)

#endif


typedef unsigned int uint;


typedef enum
{
	OPERATION_SUCCESS 			= 0	,
	ERROR_THREAD_UNKNOWN			,
	ERROR_SYSTEM_CALL				,
	ERROR_THREAD_ALREADY_SLEEPING

} result_t;

#endif /* COMMON_DEFS_H_ */
